<?php

namespace App\Jobs;

use App\Services\MessageService;

class SendMessageJob extends Job
{
    /**
     * @var
     * 消息
     */
    protected $message;

    /**
     * SendMessageJob constructor.
     * @param $message
     */
    public function __construct($message)
    {
        $this->message = $message;
    }

    /**
     * @throws \App\Common\Tools\CustomException
     */
    public function handle()
    {
        $messageService = new MessageService();
        $messageService->send($this->message);
    }
}
